package io.renren.modules.app.controller;

import io.renren.common.result.Result;
import io.renren.modules.medical.service.MedicationAdviceService;
import io.renren.modules.medical.vo.weixinVo.ApiAdviceListVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-04-27 15:04
 */
@RestController
@RequestMapping("app/medication/advice")
@RequiredArgsConstructor
public class MedicationAdviceApi {

    private final MedicationAdviceService medicationAdviceService;


    // 根据用户id获取到发送给用户的所有medicalAdvice
    @GetMapping("list")
    public Result<List<ApiAdviceListVo>> getAdviceList(){
        List<ApiAdviceListVo> resultList = medicationAdviceService.getAdviceList();
        return Result.success(resultList);
    }
}
